{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 6.5 Lab 1: Subset Selection Methods"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "from sklearn.linear_model import LinearRegression\n",
    "from sklearn.model_selection import train_test_split\n",
    "from sklearn.metrics import mean_squared_error,r2_score\n",
    "\n",
    "imposklearnplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "\n",
    "from itertools import combinations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.5.1 Best Subset Selection"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(322, 21)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>AtBat</th>\n",
       "      <th>Hits</th>\n",
       "      <th>HmRun</th>\n",
       "      <th>Runs</th>\n",
       "      <th>RBI</th>\n",
       "      <th>Walks</th>\n",
       "      <th>Years</th>\n",
       "      <th>CAtBat</th>\n",
       "      <th>CHits</th>\n",
       "      <th>...</th>\n",
       "      <th>CRuns</th>\n",
       "      <th>CRBI</th>\n",
       "      <th>CWalks</th>\n",
       "      <th>League</th>\n",
       "      <th>Division</th>\n",
       "      <th>PutOuts</th>\n",
       "      <th>Assists</th>\n",
       "      <th>Errors</th>\n",
       "      <th>Salary</th>\n",
       "      <th>NewLeague</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-Andy Allanson</td>\n",
       "      <td>293</td>\n",
       "      <td>66</td>\n",
       "      <td>1</td>\n",
       "      <td>30</td>\n",
       "      <td>29</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "      <td>293</td>\n",
       "      <td>66</td>\n",
       "      <td>...</td>\n",
       "      <td>30</td>\n",
       "      <td>29</td>\n",
       "      <td>14</td>\n",
       "      <td>A</td>\n",
       "      <td>E</td>\n",
       "      <td>446</td>\n",
       "      <td>33</td>\n",
       "      <td>20</td>\n",
       "      <td>NaN</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-Alan Ashby</td>\n",
       "      <td>315</td>\n",
       "      <td>81</td>\n",
       "      <td>7</td>\n",
       "      <td>24</td>\n",
       "      <td>38</td>\n",
       "      <td>39</td>\n",
       "      <td>14</td>\n",
       "      <td>3449</td>\n",
       "      <td>835</td>\n",
       "      <td>...</td>\n",
       "      <td>321</td>\n",
       "      <td>414</td>\n",
       "      <td>375</td>\n",
       "      <td>N</td>\n",
       "      <td>W</td>\n",
       "      <td>632</td>\n",
       "      <td>43</td>\n",
       "      <td>10</td>\n",
       "      <td>475.0</td>\n",
       "      <td>N</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-Alvin Davis</td>\n",
       "      <td>479</td>\n",
       "      <td>130</td>\n",
       "      <td>18</td>\n",
       "      <td>66</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>3</td>\n",
       "      <td>1624</td>\n",
       "      <td>457</td>\n",
       "      <td>...</td>\n",
       "      <td>224</td>\n",
       "      <td>266</td>\n",
       "      <td>263</td>\n",
       "      <td>A</td>\n",
       "      <td>W</td>\n",
       "      <td>880</td>\n",
       "      <td>82</td>\n",
       "      <td>14</td>\n",
       "      <td>480.0</td>\n",
       "      <td>A</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-Andre Dawson</td>\n",
       "      <td>496</td>\n",
       "      <td>141</td>\n",
       "      <td>20</td>\n",
       "      <td>65</td>\n",
       "      <td>78</td>\n",
       "      <td>37</td>\n",
       "      <td>11</td>\n",
       "      <td>5628</td>\n",
       "      <td>1575</td>\n",
       "      <td>...</td>\n",
       "      <td>828</td>\n",
       "      <td>838</td>\n",
       "      <td>354</td>\n",
       "      <td>N</td>\n",
       "      <td>E</td>\n",
       "      <td>200</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>500.0</td>\n",
       "      <td>N</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-Andres Galarraga</td>\n",
       "      <td>321</td>\n",
       "      <td>87</td>\n",
       "      <td>10</td>\n",
       "      <td>39</td>\n",
       "      <td>42</td>\n",
       "      <td>30</td>\n",
       "      <td>2</td>\n",
       "      <td>396</td>\n",
       "      <td>101</td>\n",
       "      <td>...</td>\n",
       "      <td>48</td>\n",
       "      <td>46</td>\n",
       "      <td>33</td>\n",
       "      <td>N</td>\n",
       "      <td>E</td>\n",
       "      <td>805</td>\n",
       "      <td>40</td>\n",
       "      <td>4</td>\n",
       "      <td>91.5</td>\n",
       "      <td>N</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          Unnamed: 0  AtBat  Hits  HmRun  Runs  RBI  Walks  Years  CAtBat  \\\n",
       "0     -Andy Allanson    293    66      1    30   29     14      1     293   \n",
       "1        -Alan Ashby    315    81      7    24   38     39     14    3449   \n",
       "2       -Alvin Davis    479   130     18    66   72     76      3    1624   \n",
       "3      -Andre Dawson    496   141     20    65   78     37     11    5628   \n",
       "4  -Andres Galarraga    321    87     10    39   42     30      2     396   \n",
       "\n",
       "   CHits  ...  CRuns  CRBI  CWalks  League Division PutOuts  Assists  Errors  \\\n",
       "0     66  ...     30    29      14       A        E     446       33      20   \n",
       "1    835  ...    321   414     375       N        W     632       43      10   \n",
       "2    457  ...    224   266     263       A        W     880       82      14   \n",
       "3   1575  ...    828   838     354       N        E     200       11       3   \n",
       "4    101  ...     48    46      33       N        E     805       40       4   \n",
       "\n",
       "   Salary  NewLeague  \n",
       "0     NaN          A  \n",
       "1   475.0          N  \n",
       "2   480.0          A  \n",
       "3   500.0          N  \n",
       "4    91.5          N  \n",
       "\n",
       "[5 rows x 21 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = pd.read_csv(r'E:\\programming\\dataset\\Into_to_statstical_learning\\Hitters.csv')\n",
    "print(data.shape)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "59"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# counting the missing observations in salary\n",
    "data['Salary'].isnull().sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# removing or dropping the observations with null values\n",
    "data.dropna(inplace = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Shape of data after dropiing na is  (263, 21)\n"
     ]
    }
   ],
   "source": [
    "print('Shape of data after dropiing na is ',data.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Qualitative variables are -  ['Unnamed: 0', 'League', 'Division', 'NewLeague']\n"
     ]
    }
   ],
   "source": [
    "qual_variables = [col for col in data.columns if data[col].dtype == 'O']\n",
    "print('Qualitative variables are - ',qual_variables)\n",
    "# The first col, unnamed 0, represents the name and is not useful for our current purpose\n",
    "# one hot encoding the qualitatve variables\n",
    "data = pd.get_dummies(data,columns = qual_variables[1:],drop_first=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>AtBat</th>\n",
       "      <th>Hits</th>\n",
       "      <th>HmRun</th>\n",
       "      <th>Runs</th>\n",
       "      <th>RBI</th>\n",
       "      <th>Walks</th>\n",
       "      <th>Years</th>\n",
       "      <th>CAtBat</th>\n",
       "      <th>CHits</th>\n",
       "      <th>CHmRun</th>\n",
       "      <th>CRuns</th>\n",
       "      <th>CRBI</th>\n",
       "      <th>CWalks</th>\n",
       "      <th>PutOuts</th>\n",
       "      <th>Assists</th>\n",
       "      <th>Errors</th>\n",
       "      <th>Salary</th>\n",
       "      <th>League_N</th>\n",
       "      <th>Division_W</th>\n",
       "      <th>NewLeague_N</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>315</td>\n",
       "      <td>81</td>\n",
       "      <td>7</td>\n",
       "      <td>24</td>\n",
       "      <td>38</td>\n",
       "      <td>39</td>\n",
       "      <td>14</td>\n",
       "      <td>3449</td>\n",
       "      <td>835</td>\n",
       "      <td>69</td>\n",
       "      <td>321</td>\n",
       "      <td>414</td>\n",
       "      <td>375</td>\n",
       "      <td>632</td>\n",
       "      <td>43</td>\n",
       "      <td>10</td>\n",
       "      <td>475.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>479</td>\n",
       "      <td>130</td>\n",
       "      <td>18</td>\n",
       "      <td>66</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>3</td>\n",
       "      <td>1624</td>\n",
       "      <td>457</td>\n",
       "      <td>63</td>\n",
       "      <td>224</td>\n",
       "      <td>266</td>\n",
       "      <td>263</td>\n",
       "      <td>880</td>\n",
       "      <td>82</td>\n",
       "      <td>14</td>\n",
       "      <td>480.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>496</td>\n",
       "      <td>141</td>\n",
       "      <td>20</td>\n",
       "      <td>65</td>\n",
       "      <td>78</td>\n",
       "      <td>37</td>\n",
       "      <td>11</td>\n",
       "      <td>5628</td>\n",
       "      <td>1575</td>\n",
       "      <td>225</td>\n",
       "      <td>828</td>\n",
       "      <td>838</td>\n",
       "      <td>354</td>\n",
       "      <td>200</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>500.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>321</td>\n",
       "      <td>87</td>\n",
       "      <td>10</td>\n",
       "      <td>39</td>\n",
       "      <td>42</td>\n",
       "      <td>30</td>\n",
       "      <td>2</td>\n",
       "      <td>396</td>\n",
       "      <td>101</td>\n",
       "      <td>12</td>\n",
       "      <td>48</td>\n",
       "      <td>46</td>\n",
       "      <td>33</td>\n",
       "      <td>805</td>\n",
       "      <td>40</td>\n",
       "      <td>4</td>\n",
       "      <td>91.5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>594</td>\n",
       "      <td>169</td>\n",
       "      <td>4</td>\n",
       "      <td>74</td>\n",
       "      <td>51</td>\n",
       "      <td>35</td>\n",
       "      <td>11</td>\n",
       "      <td>4408</td>\n",
       "      <td>1133</td>\n",
       "      <td>19</td>\n",
       "      <td>501</td>\n",
       "      <td>336</td>\n",
       "      <td>194</td>\n",
       "      <td>282</td>\n",
       "      <td>421</td>\n",
       "      <td>25</td>\n",
       "      <td>750.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   AtBat  Hits  HmRun  Runs  RBI  Walks  Years  CAtBat  CHits  CHmRun  CRuns  \\\n",
       "1    315    81      7    24   38     39     14    3449    835      69    321   \n",
       "2    479   130     18    66   72     76      3    1624    457      63    224   \n",
       "3    496   141     20    65   78     37     11    5628   1575     225    828   \n",
       "4    321    87     10    39   42     30      2     396    101      12     48   \n",
       "5    594   169      4    74   51     35     11    4408   1133      19    501   \n",
       "\n",
       "   CRBI  CWalks  PutOuts  Assists  Errors  Salary  League_N  Division_W  \\\n",
       "1   414     375      632       43      10   475.0         1           1   \n",
       "2   266     263      880       82      14   480.0         0           1   \n",
       "3   838     354      200       11       3   500.0         1           0   \n",
       "4    46      33      805       40       4    91.5         1           0   \n",
       "5   336     194      282      421      25   750.0         0           1   \n",
       "\n",
       "   NewLeague_N  \n",
       "1            1  \n",
       "2            0  \n",
       "3            1  \n",
       "4            1  \n",
       "5            0  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.drop(qual_variables[0],axis = 1,inplace = True)\n",
    "data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://xavierbourretsicotte.github.io/subset_selection.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# There is no similar  built in function as regsubset in python, therefore we will create one.\n",
    "# the reference is from the link that is mentioned above."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def fit_linear_reg(X,Y):\n",
    "    #Fit linear regression model and return RSS and R squared values\n",
    "    model_k = LinearRegression(fit_intercept = True)\n",
    "    model_k.fit(X,Y)\n",
    "    RSS = mean_squared_error(Y,model_k.predict(X)) * len(Y)\n",
    "    R_squared = model_k.score(X,Y)\n",
    "    return RSS, R_squared\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tqdm import tnrange, tqdm_notebook\n",
    "\n",
    "\n",
    "#Initialization variables\n",
    "Y = data['Salary']\n",
    "X = data.drop(columns = 'Salary', axis = 1)\n",
    "k = 19\n",
    "RSS_list, R_squared_list, feature_list = [],[], []\n",
    "numb_features = []\n",
    "\n",
    "#Looping over k = 1 to k = 11 features in X\n",
    "for k in tnrange(1,len(X.columns) + 1, desc = 'Loop...'):\n",
    "\n",
    "    #Looping over all possible combinations: from 11 choose k\n",
    "    for combo in combinations(X.columns,k):\n",
    "        tmp_result = fit_linear_reg(X[list(combo)],Y)   #Store temp result \n",
    "        RSS_list.append(tmp_result[0])                  #Append lists\n",
    "        R_squared_list.append(tmp_result[1])\n",
    "        feature_list.append(combo)\n",
    "        numb_features.append(len(combo))   \n",
    "\n",
    "#Store in DataFrame\n",
    "df = pd.DataFrame({'numb_features': numb_features,'RSS': RSS_list, 'R_squared':R_squared_list,'features':feature_list})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "# My PC was not fast enough to run the above code in even an hour, SO, i will leave it here.\n",
    "# Although what you need to do is to sort the df, on the basis of RSS, than figure out what are the num_features, with lowest\n",
    "# RSS, DO the same for R_squared."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 6.5.2 Forward and Backward Stepwise Selection"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>AtBat</th>\n",
       "      <th>Hits</th>\n",
       "      <th>HmRun</th>\n",
       "      <th>Runs</th>\n",
       "      <th>RBI</th>\n",
       "      <th>Walks</th>\n",
       "      <th>Years</th>\n",
       "      <th>CAtBat</th>\n",
       "      <th>CHits</th>\n",
       "      <th>CHmRun</th>\n",
       "      <th>CRuns</th>\n",
       "      <th>CRBI</th>\n",
       "      <th>CWalks</th>\n",
       "      <th>PutOuts</th>\n",
       "      <th>Assists</th>\n",
       "      <th>Errors</th>\n",
       "      <th>Salary</th>\n",
       "      <th>League_N</th>\n",
       "      <th>Division_W</th>\n",
       "      <th>NewLeague_N</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>315</td>\n",
       "      <td>81</td>\n",
       "      <td>7</td>\n",
       "      <td>24</td>\n",
       "      <td>38</td>\n",
       "      <td>39</td>\n",
       "      <td>14</td>\n",
       "      <td>3449</td>\n",
       "      <td>835</td>\n",
       "      <td>69</td>\n",
       "      <td>321</td>\n",
       "      <td>414</td>\n",
       "      <td>375</td>\n",
       "      <td>632</td>\n",
       "      <td>43</td>\n",
       "      <td>10</td>\n",
       "      <td>475.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>479</td>\n",
       "      <td>130</td>\n",
       "      <td>18</td>\n",
       "      <td>66</td>\n",
       "      <td>72</td>\n",
       "      <td>76</td>\n",
       "      <td>3</td>\n",
       "      <td>1624</td>\n",
       "      <td>457</td>\n",
       "      <td>63</td>\n",
       "      <td>224</td>\n",
       "      <td>266</td>\n",
       "      <td>263</td>\n",
       "      <td>880</td>\n",
       "      <td>82</td>\n",
       "      <td>14</td>\n",
       "      <td>480.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>496</td>\n",
       "      <td>141</td>\n",
       "      <td>20</td>\n",
       "      <td>65</td>\n",
       "      <td>78</td>\n",
       "      <td>37</td>\n",
       "      <td>11</td>\n",
       "      <td>5628</td>\n",
       "      <td>1575</td>\n",
       "      <td>225</td>\n",
       "      <td>828</td>\n",
       "      <td>838</td>\n",
       "      <td>354</td>\n",
       "      <td>200</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>500.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>321</td>\n",
       "      <td>87</td>\n",
       "      <td>10</td>\n",
       "      <td>39</td>\n",
       "      <td>42</td>\n",
       "      <td>30</td>\n",
       "      <td>2</td>\n",
       "      <td>396</td>\n",
       "      <td>101</td>\n",
       "      <td>12</td>\n",
       "      <td>48</td>\n",
       "      <td>46</td>\n",
       "      <td>33</td>\n",
       "      <td>805</td>\n",
       "      <td>40</td>\n",
       "      <td>4</td>\n",
       "      <td>91.5</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>594</td>\n",
       "      <td>169</td>\n",
       "      <td>4</td>\n",
       "      <td>74</td>\n",
       "      <td>51</td>\n",
       "      <td>35</td>\n",
       "      <td>11</td>\n",
       "      <td>4408</td>\n",
       "      <td>1133</td>\n",
       "      <td>19</td>\n",
       "      <td>501</td>\n",
       "      <td>336</td>\n",
       "      <td>194</td>\n",
       "      <td>282</td>\n",
       "      <td>421</td>\n",
       "      <td>25</td>\n",
       "      <td>750.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   AtBat  Hits  HmRun  Runs  RBI  Walks  Years  CAtBat  CHits  CHmRun  CRuns  \\\n",
       "1    315    81      7    24   38     39     14    3449    835      69    321   \n",
       "2    479   130     18    66   72     76      3    1624    457      63    224   \n",
       "3    496   141     20    65   78     37     11    5628   1575     225    828   \n",
       "4    321    87     10    39   42     30      2     396    101      12     48   \n",
       "5    594   169      4    74   51     35     11    4408   1133      19    501   \n",
       "\n",
       "   CRBI  CWalks  PutOuts  Assists  Errors  Salary  League_N  Division_W  \\\n",
       "1   414     375      632       43      10   475.0         1           1   \n",
       "2   266     263      880       82      14   480.0         0           1   \n",
       "3   838     354      200       11       3   500.0         1           0   \n",
       "4    46      33      805       40       4    91.5         1           0   \n",
       "5   336     194      282      421      25   750.0         0           1   \n",
       "\n",
       "   NewLeague_N  \n",
       "1            1  \n",
       "2            0  \n",
       "3            1  \n",
       "4            1  \n",
       "5            0  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "def forward_stepwise_selection(data,target):\n",
    "    total_features = [[]]\n",
    "    score_dict = {}\n",
    "    remaining_features = [col for col in data.columns if not col == target]\n",
    "    for i in range(1,len(data.columns)):\n",
    "        best_score = 0;best_feature = None\n",
    "        for feature in remaining_features:\n",
    "\n",
    "            X = total_features[i-1] + [feature]\n",
    "            model = LinearRegression().fit(data[X],data[target])\n",
    "            score = r2_score(data[target],model.predict(data[X]))\n",
    "#             print('For len {}, feature - {}, score is {}'.format(i,feature,score))\n",
    "\n",
    "            if score > best_score:\n",
    "                best_score = score\n",
    "                best_feature = feature\n",
    "        total_features.append(total_features[i-1] + [best_feature])\n",
    "        remaining_features.remove(best_feature)\n",
    "        score_dict[i] = best_score\n",
    "    return total_features,score_dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "total_features_fwd,score_dict_fwd = forward_stepwise_selection(data,'Salary')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The best model with 1 features - ['CRBI']\n",
      "R_2 score is  0.3214500886678947\n",
      "\n",
      "The best model with 2 features - ['CRBI', 'Hits']\n",
      "R_2 score is  0.42522374646677885\n",
      "\n",
      "The best model with 3 features - ['CRBI', 'Hits', 'PutOuts']\n",
      "R_2 score is  0.45142941571795725\n",
      "\n",
      "The best model with 4 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W']\n",
      "R_2 score is  0.47540665339478694\n",
      "\n",
      "The best model with 5 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat']\n",
      "R_2 score is  0.4908036159635182\n",
      "\n",
      "The best model with 6 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks']\n",
      "R_2 score is  0.5087145573589967\n",
      "\n",
      "The best model with 7 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks']\n",
      "R_2 score is  0.5132286393324802\n",
      "\n",
      "The best model with 8 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns']\n",
      "R_2 score is  0.5281385504329165\n",
      "\n",
      "The best model with 9 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat']\n",
      "R_2 score is  0.5346124477924314\n",
      "\n",
      "The best model with 10 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists']\n",
      "R_2 score is  0.5404949509407981\n",
      "\n",
      "The best model with 11 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N']\n",
      "R_2 score is  0.5426153254254202\n",
      "\n",
      "The best model with 12 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs']\n",
      "R_2 score is  0.543630208632163\n",
      "\n",
      "The best model with 13 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors']\n",
      "R_2 score is  0.5444570142319775\n",
      "\n",
      "The best model with 14 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors', 'HmRun']\n",
      "R_2 score is  0.5452163563014891\n",
      "\n",
      "The best model with 15 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors', 'HmRun', 'CHits']\n",
      "R_2 score is  0.5454692306811637\n",
      "\n",
      "The best model with 16 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors', 'HmRun', 'CHits', 'RBI']\n",
      "R_2 score is  0.54576555748528\n",
      "\n",
      "The best model with 17 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors', 'HmRun', 'CHits', 'RBI', 'NewLeague_N']\n",
      "R_2 score is  0.545951808076699\n",
      "\n",
      "The best model with 18 features - ['CRBI', 'Hits', 'PutOuts', 'Division_W', 'AtBat', 'Walks', 'CWalks', 'CRuns', 'CAtBat', 'Assists', 'League_N', 'Runs', 'Errors', 'HmRun', 'CHits', 'RBI', 'NewLeague_N', 'Years']\n",
      "R_2 score is  0.546094522341906\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# lets print the selceted features for first 5 models\n",
    "for i in range(1,len(total_features_fwd)-1):\n",
    "    print('The best model with {} features - {}'.format(i,total_features_fwd[i]))\n",
    "    print('R_2 score is ',score_dict_fwd[i])\n",
    "    print()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1, 'Forward Selection')"
      ]
     },
     "execution_count": 68,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "<Figure size 864x432 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFwCAYAAACGt6HXAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deZxcdZ3u8c/Tnc6+kwSyQVgCCIgBAgqKIFsiOoTBDWe8ghuDiriCcJ1xGLxcWa6KCw4DCrigiIKZwCARURBFlgAhIZCYFehOgED2pDu9fe8f53QoOtVbUqdOL8/79apX11nrW9WdJ6d+53d+RxGBmZmVX0XeBZiZ9VUOYDOznDiAzcxy4gA2M8uJA9jMLCcOYDOznDiArU+SdKKk6gz2O0VSS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hfRCxp9fqXAS8DbyF533VtbL/jc0kNLHheFxFNBa+zKCKOLbKP95D8B3IG8G+SDo3XB3W3bsZtwJapiFgH3E5yQqvFKuCo9Pkskq/UXfUBSRVpu/B+wBKSkck+rWR4UCQdmI581Z5HgRMkjUlPbn0YeHAX6iF9/c8VjOh2RDp/BLAmPWL/XyRHrACbSW5j1WIVMC19X5Npe7jEJcBYScemr1Ml6VBJFcDkiPgTcDFJM8jQXXwvVgY+ArZy+BbJSGctbgT+W9JjJCOPtXV02p4lJEG5J8koWHWSfkTSPvtkGoJrKX5roR0iYo2kS4E/kRxZ3hMRxYai7IxvkBzxL0hffxXJWL4/BO6Q9IH0dVre7wKgUdLTJO3a1wIrSZpbniH55lCs5vq0meV7kkaQ/Du+lqTN+efpPAHfiYgNu/herAw8GpqZWU7cBGFmlhMHsJlZThzAZmY5cQCbmeXEAWxmlhMHsJlZThzAZmY5+f9MQk5AXI2kKAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# this looks a bit boring to read. Lets plot the results of the above text\n",
    "temp = pd.DataFrame({'Number of Features':np.arange(1,len(total_features_fwd)),'R_2_score':list(score_dict_fwd.values())})\n",
    "plt.figure(figsize = (12,6))\n",
    "g = sns.FacetGrid(data = temp,size=5)\n",
    "g.map(plt.scatter, 'Number of Features' , 'R_2_score')\n",
    "g.map(plt.plot, 'Number of Features', 'R_2_score')\n",
    "plt.xticks = list(np.arange(1,len(total_features_fwd)))\n",
    "plt.title('Forward Selection')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [],
   "source": [
    "# we can see from the above graph that as the number of features increases, the value of R2 increases.\n",
    "# If we choose this metric to choose the best model amonf all the size, we would always end up choosing the model with \n",
    "# highest features, however, we know that this is not the case, therefore we will use some other metrics to select the model."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Using cross validation to choose which model is best"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### validation approach"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train,X_test,y_train,y_test = train_test_split(data.drop('Salary',axis = 1),data['Salary'],test_size = 0.2,random_state = 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {},
   "outputs": [],
   "source": [
    "validation_approach_score = {}\n",
    "for features in total_features_fwd[1:]:\n",
    "    model = LinearRegression()\n",
    "    model.fit(X_train[features],y_train)\n",
    "    score = mean_squared_error(y_test,model.predict(X_test[features])) * len(y_test)\n",
    "    validation_approach_score[len(features)] = score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'Validatoin Approach')"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAEWCAYAAAC5XZqEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOzdeXxdVbn/8c+3SdO5STqnTUpHWoY2pQ1lkrEMnaCooKAXyuBFuYCiotTL7zrrReWqgIKgIKAIFgSpTKUyKFOBdKaU0nRMOpc26TwkeX5/7BU4DRlO2pxzMjzv12u/cs7aa+21zm56nuy1115LZoZzzjmXTG1S3QDnnHOtjwcf55xzSefBxznnXNJ58HHOOZd0Hnycc84lnQcf55xzSefBx7kYkgZIMknp4f1zkqbGk7eR23GqpKWNfdzmRNIDkn6c6na4xPDg41oUSTMl/bCG9CmSNjQ0UJjZBDN7sBHadYakkgbU+6qZ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Wdbdx6SFJH2Qc6AkyRCdOXy7IUknpLCvFG3gFnJO0vG/kXySWtdrwGhktBRdKpcr0bmC2d2iWyUwH4Qx7dXjMD9Jd59dA6tn8KOCBpoIzTKalPUgfQExHjwDVgH7C3zbnYNuXOx2zNXTLFuuYR8FLSBJkg3aor2cgUWSQOkonE85Iek3tBH0oBmKP5cdirImJW0g1gnOwoXkVEs+MUtuI22elNlvFnyHN3HgLPJQ2VcWrznQSWJH0kk5VHgO/kEuNnsmNs9syLZWnxvqRu8v9mhEyHflauCbgXEb/anIttU061NjOzynnZzczMKufiY2ZmlXPxMTOzyrn4mJlZ5Vx8zMysci4+ZmZWORcfMzOr3H805JT/qZszhAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.lineplot(np.arange(1,len(total_features_fwd)),list(validation_approach_score.values()))\n",
    "plt.xlabel('Number of Features')\n",
    "plt.ylabel('RSS_values')\n",
    "plt.title('Validatoin Approach')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [],
   "source": [
    "# THe lowest value of r2 is for the model having 8 features, which is quite different from the book.\n",
    "# In the book it was the model with 10 features that was selected."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {},
   "outputs": [],
   "source": [
    "# --OPTIONAL--\n",
    "# Lets try and use adjusted r2 to select the best modekl\n",
    "# We calcualte adjusted r2 on the training set only\n",
    "# Adj r2 = 1-(1-R2)*(n-1)/(n-p-1)\n",
    "adj_R2_score = {}\n",
    "for features in total_features_fwd[1:]:\n",
    "    model = LinearRegression()\n",
    "    model.fit(data[features],data['Salary'])\n",
    "    score = r2_score(model.predict(data[features]),data['Salary']) \n",
    "    p = len(features)\n",
    "    n = len(data)\n",
    "    adj_r2 = 1-(1-score)*(n-1)/(n-p-1)\n",
    "    adj_R2_score[len(features)] = adj_r2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'ADJUSTED R2 VALUES')"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEWCAYAAACXGLsWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deZgcZbn38e9vZjJZyb6QPQHDFsQIAwIqi6ACogGVTYWgKC4HPfq+XJoj6sH1oBx94ShHRVQWQUUFWRUBwR0kQbaEJQFmkpCQZbKQzGSZ5X7/qJqk0/RMd5Lp6Z7p3+e66upanq66p6an76nneeopRQRmZmZdqSp1AGZmVv6cLMzMLC8nCzMzy8vJwszM8nKyMDOzvJwszMwsLycLMzPLy8nCSkLSg5LWSeqftf5aSdskbUynpyT9l6RhGWWOk7QsY7le0olZ+zlf0l8zli+Q9Ey6z5WS7pK0l6TfSdqUTi3psTuWf5Aeqz1jXcd0VMbPsSXd7yuS5kuam/1zdfIzbpK0VtK9kg7I2P4OSX+VtF7Sy5J+JGmvTvZ1j6Sv5Fg/O31vTca6SyWFpCO6OldZ27o8t5KmpfvMPj9npdsnSfqNpDWSNkh6UtL5nZ0bK19OFtbjJE0D3gwE8K4cRb4VEXsBY4APAkcCf5M0eDePdyzwDeCcdL8HAjcDRMTJETEkIoYAN6bHHpJOH0t3sTxjXcf0j4xDXJTudzzwf4GzgbslqYuwvpUecyLwEvDjjG3DgK8BE9JYJwGXd7Kfa4FzcxzrXODGiGhNz4HSdWuBOV3EtbuGZ52fX6brbwCWAlOBUcB5wMoiHN+KzMnCSuE84CGSL7pOv7giYktEPEKSUEaRJI7dcTjwj4j4V7r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eB/6Qrn8SyKwOujmSQeoWSXoBOIBkvJ5DMq5ahpF8OW8D/hkRL+Y43uHAgxGxOj3mjSQPyMk3Cu7zETEra93bgHdJujhdHgBMIfkC/56kWUAbsF+efefSRjLQJcD+wMHAvenwWtUkQ1hAMrzGjZJ+W8DPYH2Qk4X1VleQDEf+04x1raRVq+lggpmNw1sz5tszltvZ+e8ge/ybIBkX65MRsdPgfmlVTlMn8eUaJnt3CXhPRDybdfxLgZXA60h+7i2dvH/7eUkNyJjfEhFtGcdZEBFH5djHO0iS3buAL0qaGTselmQVwG0W1itFxFrgZpLG4g71wGHp/GySapVddYakqrQdYx/gWZIRYD+uZLh5JO2XjhDalYeBYyWNThuOzwH+tBvxkB7/kxmj6b4+XT8MWJFeCZ1LciUAsJHkMb4d6oFZ6c81mc6HwH4WGCPpqPQ4/STNlFQFTI6IB4DPklSFDdnNn8V6KV9ZWG/2bZJRZjv8CLhN0j9JRnjt7L/+rjxL8qU+jmS00C2SriFpT3g0/cJeTe7Ho24XESsk/QfwAMl/7HdHRK7hyQvxVZIrqSfS49eTPHfif4HfSDojPU7Hz/sE0CrpcZJ2mCuAF0mq3J4iuSLLFfO2tKrtfyQNI/l+uIKkjeRn6ToB/y8i1u/mz2K9lEedNTOzvFwNZWZmeTlZmJlZXk4WZmaWl5OFmZnl5WRhZmZ5OVmYmVleThZmZpbX/wdcyX4I+V96IwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.lineplot(np.arange(1,len(total_features_fwd)),list(adj_R2_score.values()))\n",
    "plt.xlabel('Number of Features')\n",
    "plt.ylabel('Adj_R2_values')\n",
    "plt.title('ADJUSTED R2 VALUES')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Using this approach we get the best model as model with 12 features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
